/**
 * Author@ Cheng Feitian
 * Date: 2021-4-11
 * Description: 第一题
 */

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <cmath>

using namespace std;

int process(string &nums)
{
    int result = 0;
    vector<string> temp;
    int wordLen = 0;

    //处理字符串数组
    for (int i = 0; i < nums.size(); i++)
    {
        while (nums[i] != ' ')
        {
            wordLen++;
            i++;
        }
        temp.push_back(nums.substr(i - wordLen, wordLen));
        wordLen = 0;
    }

    int numbers[temp.size()];
    for (int i = 0; i < temp.size(); i++)
    {
        if (temp[i][0] == '-')
        {
            numbers[i] = (0 - (temp[i][1] - '0'));
            for (int j = 2; j < temp[i].length(); j++)
            {
                numbers[i] = numbers[i] * 10 - (temp[i][j] - '0');
            }
        }
        else
        {
            numbers[i] = temp[i][1] - '0';
            for (int j = 2; j < temp[i].length(); j++)
            {
                numbers[i] = numbers[i] * 10 + (temp[i][j] - '0');
            }
        }
    }

    //计算了
    for (int i = 0; i < temp.size(); i++)
    {
        for (int j = temp.size() - 1; j > i; j--)
        {
            if (abs(numbers[i] + numbers[j]) > result)
            {
                result = abs(numbers[i] + numbers[j]);
            }
        }
    }

    return result;
}

int main()
{
    string nums;
    cin >> nums;

    int ret = process(nums);
    // cout << sizeof(nums) / sizeof(int);
    cout << ret;

    return 0;
}
